import { GLOBAL_LIST_PARAM } from '../../../utils/const';
import main from './main';
import seconed from './seconed';

export function getPort(port: chrome.runtime.Port) {
    if (port.name === GLOBAL_LIST_PARAM.connect.mian) {
        main(port);
    } else if (port.name === GLOBAL_LIST_PARAM.connect.seconed) {
        seconed(port);
    }
}